<?php
/**
 * Albireo library
 *
 * @copyright  Copyright (c) 2010 Albireo Solutions
 * @package    Kernel
 */
namespace Albireo;

use Nette\Object;

/**
 * Class mode to set albireo to different states
 *
 * @author     Albireo Solutions
 * @package    Kernel
 */
final class Mode extends Object {
    private static $critical = FALSE;
    private static $message;

    /**
     * sets critical mode
     */
    public static function setCriticalMode($message) {
        self::$critical = TRUE;
        self::setMessage($message);
    }

    /**
     * sets normal mode
     */
    public static function setNormalMode() {
        self::$critical = FALSE;
    }

    /**
     * returns current mode
     *
     * @return boolean mode
     */
    public static function isCritical() {
        return self::$critical;
    }

    private static function setMessage($message) {
        self::$message = $message;
    }

    public static function getMessage() {
        return self::$message;
    }
}
